﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MessageBoard.aspx.cs" Inherits="NJL.WebUsers.Visitor.MessageBoard" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Import Namespace="Royalsoft.Common" %>
<%@ Register Src="~/Controls/WUCHeaderVisitor.ascx" TagName="WUCHeaderVisitor" TagPrefix="uc1" %>
<%@ Register Src="~/Controls/WUCFooter.ascx" TagName="WUCFooter" TagPrefix="uc2" %>
<%@ Register Src="~/Controls/WUCFooterShop.ascx" TagName="WUCFooterShop" TagPrefix="uc3" %>
<%@ Register src="~/Controls/WUCVisitorSpaceLeftUserInfo.ascx" tagname="WUCVisitorSpaceLeftUserInfo" tagprefix="uc5" %>
<%@ Register src="~/Controls/WUCVisitorSpaceLeftLastVisitor.ascx" tagname="WUCVisitorSpaceLeftLastVisitor" tagprefix="uc6" %>
<%@ Register src="~/Controls/WUCVisitorSpaceLeftAttention.ascx" tagname="WUCVisitorSpaceLeftAttention" tagprefix="uc7" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>留言-农家乐网</title>
    <link rel="stylesheet" type="text/css" href="/Styles/personal/personl_001/base_001.css">
    <script type="text/javascript" language="javascript" src="/Scripts/jquery-1.4.1.min.js"></script>
     <script src="/Scripts/popup_layer.js" type="text/javascript"></script>
    <script src="/Scripts/js/jquery.skygqbox.1.3.js" type="text/javascript" charset="UTF-8"></script>
    <script type="text/javascript">
        function check() {
            var comment = $('#<%=txtComment.ClientID %>').val();
            comment = $.trim(comment);
            if (comment == "") {
                alert("留言内容不能为空哦^_^");
                return false;
            }
            if (comment.length > 100) {
                alert('留言内容不能超过100个字哦^_^');
                return false;
            }
            var txtValidate = document.getElementById("<%=txtValidate.ClientID %>").value;
            txtValidate = $.trim(txtValidate);
            if (txtValidate == "") {
                alert("验证码不能为空哦^_^");
                return false;
            }
        }
        function GetValidate() {
            document.getElementById("Validate").src = "/ValidateCode.aspx?rand=" + Math.random();
        }  
   
    </script>
</head>
<body>
    <form id="form1" runat="server">
          <%
        if (UserId == "" || UserName == "")
        {         
    %>
    <script language="javascript" type="text/javascript">
        $(document).ready(function () {
            //示例9，综合效果
            var t9 = new PopupLayer({ trigger: "#txtComment", popupBlk: "#blk9", closeBtn: "#close9", useOverlay: true, useFx: true,
                offsets: {
                    x: 0,
                    y: -41
                }
            });
            t9.doEffects = function (way) {
                if (way == "open") {
                    this.popupLayer.css({ opacity: 0.3 }).show(400, function () {
                        this.popupLayer.animate({
                            left: ($(document).width() - this.popupLayer.width()) / 2,
                            top: (document.documentElement.clientHeight - this.popupLayer.height()) / 2 + $(document).scrollTop(),
                            opacity: 0.8
                        }, 1000, function () { this.popupLayer.css("opacity", 1) } .binding(this));
                    } .binding(this));
                    document.getElementById('Login').src = '<%=WEBSITE_USRE_DOMAIN %>/SecondLogin.aspx?websitecode=<%=WEBSITE_CODE %>&domain=<%=WEBSITE_DOMAIN %>&url=<%=Request.RawUrl %>';
                }
                else {
                    this.popupLayer.animate({
                        left: this.trigger.offset().left,
                        top: this.trigger.offset().top,
                        opacity: 0.1
                    }, { duration: 500, complete: function () { this.popupLayer.css("opacity", 1); this.popupLayer.hide() } .binding(this) });
                }
            }
        });
    </script>
             <div id="blk9" class="blk">
            <div class="popup_title">
                <span class="float_r"><a href="javascript:void(0)" id="close9">关闭</a></span>
                <ul>
                    <li class="now">
                        <a target="main">登录</a>
                    </li>
                </ul>
            </div>
            <div>
                <iframe id="Login" name="main" width="500"
                    height="420" style="overflow:hidden; border:none;"></iframe>
            </div>
        </div>
    <%
        }
    %>
    <uc1:WUCHeaderVisitor ID="WUCHeaderVisitor1" runat="server" />
    <!--主要内容-->
    <div class="w1003 cleanFlex" id="content">
        <!--左侧-->
        <div class="w_200 float_l">
            <uc5:WUCVisitorSpaceLeftUserInfo ID="WUCVisitorSpaceLeftUserInfo1" runat="server" />
            <!--最近来访-->
            <div class="blank"></div>
            <uc6:WUCVisitorSpaceLeftLastVisitor ID="WUCVisitorSpaceLeftLastVisitor1" runat="server" />
            <!--我的关注-->
            <div class="blank cleanFlex"></div>
            <uc7:WUCVisitorSpaceLeftAttention ID="WUCVisitorSpaceLeftAttention1" runat="server" />
        </div>
        <div class="boxgreen w_790 float_r" style="_width: 785px; overflow: hidden;">
            <!--位置-->
            <div class="titlePerson">
                <h2>
                    留言板</h2>
            </div>
            <div class="cont">
                <div class="bloglist_status">
                    <span><strong>留言共</strong>有<asp:Literal ID="litCommentCount" runat="server"></asp:Literal>个</span>
                </div>
                <!--留言板-->
                <div class="blank">
                </div>
                <%-- <div>
                        <div class="titleFont">
                            <span class="float_r">还可以输入140个字</span>
                            <h3>
                                给我留言</h3>
                        </div>
                        <div>
                            <textarea cols="5" rows="15" style="height: 36px; width: 975px;"></textarea>
                            <span class="float_r">
                                <input type="button" class="btn" value="留言" /></span>
                        </div>
                    </div>--%>
                <div>
                    <asp:TextBox ID="txtComment" runat="server" Height="50px" TextMode="MultiLine" Width="750px"></asp:TextBox>
                    <p style="margin-top: 10px;">
                        <span class="float_r">
                            <asp:Button ID="btnComment" runat="server" Text="提 交" class="btn" OnClientClick="return check()"
                                OnClick="btnComment_Click" /></span> 验证码：<asp:TextBox ID="txtValidate" runat="server"
                                    class="input" Width="60px" MaxLength="4"></asp:TextBox>&nbsp;&nbsp;<img id="Validate"
                                        onclick="javascript:GetValidate()" alt="验证码" title="看不清，点击图片，换一张" align="absmiddle"
                                        src="/ValidateCode.aspx" style="cursor: pointer" />
                    </p>
                </div>
                <div class="blank">
                </div>
                <div class="real_list cont">
                    <h3>
                        <strong>我的留言</strong></h3>
                    <asp:Repeater ID="rptCommentList" runat="server" OnItemDataBound="rptCommentList_ItemDataBound"
                        OnItemCommand="rptCommentList_ItemCommand">
                        <ItemTemplate>
                            <div class="dashline commentList cleanFlex">
                                <!--头像-->
                                <div class="float_l info_guest">
                                    <a href="/wanjia/<%#Eval("CREATE_USER_ID") %>-index.html" target="_blank">
                                        <asp:Image ID="imgUserHead" runat="server" Width="120px" Height="90px" CssClass="picBor">
                                        </asp:Image>
                                    </a>
                                    <p>
                                        <a href="/wanjia/<%#Eval("CREATE_USER_ID") %>-index.html" target="_blank">
                                            <%#Eval("CREATE_USER_NAME")%></a></p>
                                </div>
                                <div class="comment_cont">
                                    <p class="grayfont">
                                        <%#Eval("CREATE_DATE_TIME")%><asp:LinkButton ID="lbtnDel" runat="server" CommandName="Del"
                                            CommandArgument='<%#Eval("ID") %>' OnClientClick="return confirm('您确定要删除吗？')">&nbsp;&nbsp;删除</asp:LinkButton></p>
                                    <p>
                                        <%#Eval("LEAVE_MESSAGE")%>
                                    </p>
                                </div>
                                <div class="cleanFlex">
                                </div>
                            </div>
                        </ItemTemplate>
                    </asp:Repeater>
                </div>
                <!--分页-->
                <div id="pager" class="cleanFlex page" runat="server">
                </div>
                <div class="cleanFlex">
                </div>
            </div>
        </div>
    </div>
    <uc3:WUCFooterShop ID="WUCFooterShop1" runat="server" />
    </form>
</body>
</html>
